<!--#INCLUDE FILE="config.asp"-->
<%
reservation = request("reservationCode")
guestid = request("GuesId")
actualArrival = request("actualArrival")
actualDeparture = request("actualDeparture")
location = request("location")
habitacion = request("habitacion")
travelId = request("travelId")

		set objConnect = server.createObject("ADODB.Connection")       
		objConnect.open conStr

		Set oCmd = Server.CreateObject("ADODB.Command")

		oCmd.ActiveConnection = objConnect
		oCmd.CommandText = "sp_update_new_Reservation" 
		oCmd.CommandType = 4

		Set ReservationCode = oCmd.CreateParameter("@ReservationCode", 200,1,100, reservation)
		oCmd.Parameters.Append ReservationCode
		
		Set guidId = oCmd.CreateParameter("@guestId", 3,1,100, guestid)
		oCmd.Parameters.Append guidId
		
		Set actualArrival = oCmd.CreateParameter("@actualArrival", 200,1,100, actualArrival)
		oCmd.Parameters.Append actualArrival
		
		Set actualDeparture = oCmd.CreateParameter("@actualDeparture", 200,1,100, actualDeparture)
		oCmd.Parameters.Append actualDeparture
		
		Set Habitacion = oCmd.CreateParameter("@habitacion", 200,1,100, habitacion)
		oCmd.Parameters.Append Habitacion
		
		Set Location = oCmd.CreateParameter("@location", 200,1,100, location)
		oCmd.Parameters.Append Location
		
		Set travelId = oCmd.CreateParameter("@travelId", 200,1,100, travelId)
		oCmd.Parameters.Append travelId
		
		Set userId = oCmd.CreateParameter("@userId", 3,1,100,session("CostabajaId"))
		oCmd.Parameters.Append userId

		set rss = oCmd.execute
		
	
		Set oCmd1 = Server.CreateObject("ADODB.Command")

		oCmd1.ActiveConnection = objConnect
		oCmd1.CommandText = "sp_update_approvar_guest" 
		oCmd1.CommandType = 4
		
		Set actualArrival = oCmd1.CreateParameter("@actualArrival", 200,1,100, actualArrival)
		oCmd1.Parameters.Append actualArrival
		
		Set guestid = oCmd1.CreateParameter("@guestid", 3,1,100, guestid)
		oCmd1.Parameters.Append guestid
		
		Set userid = oCmd1.CreateParameter("@userid", 3,1,100,session("CostabajaId"))
		oCmd1.Parameters.Append userid

		set rss1 = oCmd1.execute
	
%>